/* 
 * File:   Task.h
 * Author: switch
 *
 * Created on 22 janvier 2013, 16:40
 */

#ifndef TASK_H
#define	TASK_H

#include <string>
#include <list>
#include <iostream>
#include "Date.h"


using namespace std;

class Task {
public:
    Task(string title, bool isOrdo);
    Task(string title, bool isOrdo, int nombre);
    virtual ~Task();
    
    //getter and setter
    void setNumber(int number);
    int getNumber() const;
    void setOrdo(bool ordo);
    bool isOrdo() const;
    void setTitre(string titre);
    string getTitre() const;
    void setDeadLine(string deadLine);
    string getDeadLine() const;

    //Gestion de la liste des taches
    void addTask(Task* t);
    void removeTask(Task* t);
    
    void setCheck(bool check);
    bool isCheck() const;
    
    
    string toString();

    void setTasksList(list<Task*> tasksList);

    list<Task*> getTasks() const;
    void taskSort();
    void setEcheance(bool Echeance);
    bool isEcheance() const;

    

    
private:
    string titre;
    bool ordo;
    int number;
    
    bool check;
    
    bool Echeance;
    
    string deadLine;
    
    list<Task*> tasksList;
    
    
    
    
    

};

int operator==(const Task& a, const Task& b);
bool operator < (const Task& a, const Task& b);

bool orderByNumber(const Task t1, const Task t2);



#endif	/* TASK_H */

